package com.kingint.mbg.ser.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableField;
import java.io.Serializable;
import java.util.List;

import com.kingint.mbg.bas.entity.BasDepartment;
import com.kingint.mbg.dto.MemberReturn;
import com.kingint.mbg.group.Insert;
import com.kingint.mbg.sys.entity.UmsMember;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.NotNull;

/**
 * <p>
 * 群发通知表
 * </p>
 *
 * @author wxh
 * @since 2020-12-25
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@ApiModel(value="SerSendMessage对象", description="群发通知表")
public class SerSendMessage implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "对应总单中的id")
    @TableField("work_id")
    private Integer workId;

    @ApiModelProperty(value = "接收人类型（0,部门全选，1，对应部门下人全选，2.对应部门下的某些人）")
    @TableField("send_type")
    @NotNull(groups = {Insert.class},message = "不能为空，接收人类型")
    private Integer sendTyp;

    /**
     * 选择的人的集合
     */
    @TableField(exist = false)
    private List<MemberReturn> memberReturnList;
    /**
     * 对应的部门集合
     */
    @TableField(exist = false)
    private List<BasDepartment> departmentList;
    /**
     * 后台使用
     */
    @TableField(exist = false)
    private List<Integer> departIdList;
    /**
     * 后台使用，
     */
    @TableField(exist = false)
    private List<Long> memberUserIdList;

    @ApiModelProperty(value = "相关通知内容")
    @TableField("content")
    private String content;

    @ApiModelProperty("标题名称")
    @TableField("title")
    private String title;

    @ApiModelProperty(value = "是否需要回复（0，不需要，1需要）")
    @TableField("is_reply")
    private Integer isReply;

    @ApiModelProperty(value = "上传图片，逗号拼接")
    @TableField("img")
    private String img;

    @ApiModelProperty(value = "创建时间")
    @TableField("create_time")
    private Date createTime;

    @ApiModelProperty(value = "工单号")
    @TableField(exist = false)
    private String orderSn;

    @TableField(exist = false)
    private Long submitUserId;

    @ApiModelProperty(value = "当前的群发通知是否已读")
    @TableField(exist = false)
    private Integer isRead;

    /**
     * 提交人员名称
     */
    @TableField(exist = false)
    private String submitUserName;


    @ApiModelProperty("发送通知中间类")
    @TableField(exist = false)
    private List<SerMessageReplyMiddle> messageReplyMiddleList;


}
